import { mapGetters } from 'vuex'
	export default {
		computed:{
			...mapGetters('m_cart',['total'])
		},
		// 动态监视购物车徽标的值
		watch:{
			total(){
				this.setBarBadge()
			}
		},
		onShow(){
			this.setBarBadge()
		},
		methods:{
			setBarBadge(){
				uni.setTabBarBadge({
					index:2,
					text:this.total + ''
				})
				// console.log(this.total)
			}
		},
	}	